function ccrInRange(spell, unit)
    if unit == nil then objUnit = Target end
    if type(unit) == "string" then objUnit = GetObjectFromUnitID(unit) end
    if type(unit) == "table" then objUnit = unit end

    if tonumber(spell) ~= nil then spell = SpellIDToName(spell) end

	if objUnit
	and objUnit:Exists()
	and not objUnit:IsDead()
	then
		local inRange = IsSpellInRange(spell, unit)
		-- inRange checklist for fucked up spells
		if inRange ~= 1 then
			-- not in range apparently
			for i=1, # tblInRange do
				vSpell, vNewSpell = strsplit(",", tblInRange[i]);
                -- Number/Distance check
                local vDistance = tonumber(spell)
                if vDistance ~= nil then
                    -- vDistance is a number not a spell string
                    if objUnit:GetDistance(Player) <= vDistance then
                        return true
                    else
                        return false
                    end
                else
    				if vSpell == spell then
    					if IsSpellInRange(vNewSpell, unit) == 1 then
    						return true
    					end
    				end
                end
			end
		else
			-- we'r in range and have a valid target
			return true
		end
		if inRange == 0 then return false end;
	end
end

tblInRange = {
	-- Warlock / Destruction
	"Immolate,Conflagrate",
	"Incinerate,Conflagrate",
	"Shadowfury,30",
    "Rain of Fire,30",
    "Havoc,Conflagrate",
	-- Mage Frost
	"Frozen Orb,Frostbolt",
	"Frost Bomb,Ice Lance",
    -- Mage Fire
    "Inferno Blast,Fireball";
    -- Mage Arcane
    "Nether Tempest,Ice Lance",
    -- Druid / Feral
    "Thrash,Mangle",
    "Swipe,Mangle",
    -- Death Knight / Blood
    "Heart Strike,Plague Strike";
    -- Death Knight / Frost
    "Frost Strike,Plague Strike",
    -- Warrior / Fury
    "Raging Blow,Heroic Strike",
    "Sunder Armor,Heroic Strike",
    -- Monk / Windwalker
    "Expel Harm,Jab",
    "Spinning Fire Blossom,Provoke",
    -- Paladin / Retribution
    "Hammer of the Righteous,Crusader Strike",
    -- Shaman / Enhancement
    "Stormstrike,Primal Strike",
    -- Hunter
    "Cobra Shot,Steady Shot",
}